<!DOCTYPE html>
<html>
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1.0">
    <title>vue-dom</title>
    <style>
      ul li{
        /* text-decoration: line-through */
      }
    </style>
  </head>
  <body>
    <div id="app">
      <div>{{title}}</div>
      <div v-if="showSub" >{{subTitle}}</div>
      <div>
        <input type="text" v-model='myTodo' />
        <button @click='pushTodo' >添加</button>
      </div>
      <ul>
        <li
          :style="{'text-decoration':!todo.done ? 'line-through' : ''}"
          @click="toogle(index)"
          v-for='(todo, index) in todos'
        >
         {{todo.text}}
        </li>
      </ul>
    </div>
    <!-- built files will be auto injected -->
  </body>
</html>
